from django.db import models

class Actor(models.Model):
    name           = models.CharField(max_length=30)
    date_of_birth  = models.DateField()
    
    def __unicode__(self):
        return self.name

class Film(models.Model):
    name    = models.CharField(max_length=60)
    year    = models.IntegerField()
    actors  = models.ManyToManyField(Actor, related_name='films')
    
    def __unicode__(self):
        return self.name
